﻿
<!DOCTYPE html>
<!--个人评估表详细-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .el-dialog__body {
            height: 100% !important;
        }

        .el-dialog.is-fullscreen {
            overflow: hidden !important;
        }


        body {
            padding-bottom: 10px;
        }

        .el-col, td {
            padding: 5px !important;
            font-size: 14px !important;
        }

        td {
            padding: 0 10px;
            font-size: 14px;
        }

    </style>
</head>

<body>
    
<div id="app" v-cloak>   
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">管理人员安全履职能力评估表</label>
        </div>

        <table style="width:100%">
            <tr>
                <td width="100%">
                    被评估人：{{Form.name}}
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    被评估人部门：{{Form.reviewGroup}}
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    被评估人岗位：{{Form.Post}}
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    评估人：{{Form.name}}
                </td>

            </tr>
        </table>

        <el-form :model="Form" ref="ruleForm" :rules="rules" status-icon style="margin-top:5px;width:100%" class="">

            <table style="border:1px  solid; width:100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <el-col span="24">
                            <el-table ref="table"
                                      :data="Form.tableData"
                                      :row-key="getRowKeys"
                                      :span-method="objectSpanMethod"
                                      border
                                      @selection-change="handleSelectionChange"
                                      row-style="height:10px"
                                      style="width: 100%;">
                                <el-table-column type="index" :label="PostSafeResponsibilityExamineManager.id" :index="indexMethod" width="60" show-overflow-tooltip="true">
                                </el-table-column>
                                <el-table-column prop="postSafeProductionContent" :label="PerformanceAssessPlan.AssessContent" width="300" show-overflow-tooltip="true">
                                </el-table-column>
                                <el-table-column prop="assessmentContent" :label="PerformanceAssessPlan.EvaluationPointRef" show-overflow-tooltip="true">
                                </el-table-column>
                                <el-table-column prop="weightScore" :label="PerformanceAssessPlan.AssignmentScore" width="100" show-overflow-tooltip="true">
                                </el-table-column>
                                <el-table-column prop="weightScore" :label="PerformanceAssessPlan.SelfScore" width="100" show-overflow-tooltip="true">
                                </el-table-column>

                                <el-table-column prop="weightScore" :label="PerformanceAssessPlan.AssessScore" width="100" show-overflow-tooltip="true">
                                </el-table-column>

                                <el-table-column prop="weightScore" :label="PerformanceAssessPlan.TotalScore" width="100" show-overflow-tooltip="true">

                                </el-table-column>
                            </el-table>
                        </el-col>

                    </td>


                </tr>
            </table>
            <br />
            <table style=" width:100% ;border-top: 1px solid;border-left: 1px solid; " cellpadding="0" cellspacing="0">
                <tr>
                    <td style="  border-right: 1px solid;border-bottom: 1px solid;" colspan="2" align="center">{{PerformanceAssessPlan.OverallSituation}}</td>
                </tr>
                <tr>
                    <td style="width:25%; border-right: 1px solid;border-bottom: 1px solid;">{{PerformanceAssessPlan.SelfEvaluation}}</td>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{Form.selfEvaluation_c}}</td>
                </tr>
                <tr>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{PerformanceAssessPlan.OverallEvaluation}}</td>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{Form.selfEvaluation_c}}</td>
                </tr>
                <tr>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{PerformanceAssessPlan.Advantage}}</td>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{Form.selfEvaluation_c}}</td>
                </tr>
                <tr>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{PerformanceAssessPlan.ItemImproved}}</td>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{Form.selfEvaluation_c}}</td>
                </tr>
                <tr>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{PerformanceAssessPlan.NextStepImprovementPlan}}</td>
                    <td style=" border-right: 1px solid;border-bottom: 1px solid;">{{Form.selfEvaluation_c}}</td>
                </tr>
            </table>

            <br />
            <div>
                备注：每项根据实际工作表现按照0-5分进行量化打分。
                <br />
                0-1分，没有理解和落实，完全没有效果；
                <br />
                1-2分，部分理解，被动执行，没有达到预期效果；
                <br />
                2-3分，基本理解，被动执行落实，部分达到预期效果；
                <br />
                3-4分，全部理解，能够执行落实，大部分达到预期效果；
                <br />
                4-5分，充分理解，自主执行，完成达到或超过预期效果；
            </div>

            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>-->
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>

        </el-form>



    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {

                id: '',
                title: '',
                Form: {
                    //name: '',
                    //reviewGroup:'',
                    //selfEvaluation: '',
                    //nextStepImprovementPlan: '',
                },

                ListItem: ListItem,

                //表单验证
                rules: {
                    //自我评价
                    selfEvaluation: [
                        verification.NotNull
                    ],
                    //下一步提升计划
                    nextStepImprovementPlan: [
                        verification.NotNull
                    ]
                }

                //
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },

                objectSpanMethod({ row, column, rowIndex, columnIndex }) {
                    console.log("oooooo",row);
                    if (columnIndex ===  6) {
                        //if (rowIndex % 2 === 0) {
                        //    return {
                        //        rowspan: 2,
                        //        colspan: 1
                        //    };
                        //} else {
                        //    return {
                        //        rowspan: 0,
                        //        colspan: 0
                        //    };
                        //}
                        return {
                                rowspan: 3,
                                colspan: 1
                            };
                    }
                },

                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                handleSelect: function (ev) {
                    console.log(ev);
                },
                handleChecked: function (value) {
                },
                handleCheckedConfirmation: function (value) {
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                getData: function () {
                    getData(this, '/api/DutiesAndResponsibilities/get?id=' + this.id);
                    console.log("xxxxxx", this.id);

                },

                //提交数据
                onSubmitForm: function (formName) {
                    //alert(formName);
                    var mythis = this;
                    //console.log(mythis)
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/DutiesAndResponsibilities/GRSBSave', mythis.Form);
                        } else {
                            showMessage(msg.NoMust, 'error');
                            //验证失败
                            return false;
                        }
                    });


                },



            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();

            }
        });
    </script>
</body>

</html>